aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/payment/[id]/bump/+server.ts
blob: ae25999c67fbe69b0017b591c403102cd5f98a84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { auth, post } from "$lib/utils";
import { json, error } from "@sveltejs/kit";

export async function POST({ cookies, request }) {
	const body = await request.json();
	try {
		const res = await post("/replace", body, auth(cookies));
		return json(res);
	} catch (e: any) {
		error(400, e.message);
	}
}